
package cn.ctyun.xstore.s3.api.bucket;

import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.s3.AmazonS3;


public class SetBucketPolicy {
    public static void setBucketPolicy(String bucketName,String policyText, AmazonS3 s3) {
        try {
            s3.setBucketPolicy(bucketName, policyText);
        } catch (AmazonServiceException e) {
            System.err.println(e.getErrorMessage());
        }
        System.out.println("Done!");
    }
}
